package org.deng.learn.designpattern.strategy;

/**
 * @author DengLibin
 * @Description  环境 (锦囊)
 * @Date 2018/11/9 0009 12:09
 */
public class Context {

    //持有策略（锦囊包含妙计）
    private IStrategy strategy;

    //将计策放入锦囊中
    public Context(IStrategy strategy){
        this.strategy = strategy;
    }
    //执行
    public  void operate(){
        strategy.operate();
    }
}
